package com.own.core.html.table;


import org.apache.wicket.extensions.markup.html.repeater.data.grid.DataGridView;
import org.apache.wicket.extensions.markup.html.repeater.data.grid.ICellPopulator;
import org.apache.wicket.extensions.markup.html.repeater.data.grid.PropertyPopulator;

/**
 * demo page for the datatable component
 * 
 * @see org.apache.wicket.extensions.markup.html.repeater.data.table.DefaultDataTable
 * 
 * @author igor
 */
public class DataGridPage extends BasePage
{
    /**
     * constructor
     */
    public DataGridPage()
    {
        ICellPopulator[] columns = new ICellPopulator[5];

        columns[0] = new PropertyPopulator("id");
        columns[1] = new PropertyPopulator("firstName");
        columns[2] = new PropertyPopulator("lastName");
        columns[3] = new PropertyPopulator("homePhone");
        columns[4] = new PropertyPopulator("cellPhone");

        add(new DataGridView("rows", columns, new SortableContactDataProvider()));
    }
}